package com.rustic.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rustic.server.po.User;
import com.rustic.server.query.UserAdminListQuery;
import com.rustic.server.vo.user.UserAdminListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 表[user]对应的实体类
 *
 * @author auto
 */

public interface UserDao extends BaseMapper<User> {

    /**
     * 联表查询用户信息
     *
     * @param query               query
     * @param userIds             userIds
     * @param enterpriseLabelList enterpriseLabelList
     * @param page                page
     * @return Page<User>
     */
    Page<UserAdminListVO> pageByJoin(@Param("param") UserAdminListQuery query,
                                     @Param("userIds") List<Integer> userIds,
                                     @Param("enterpriseLabelList") List<Integer> enterpriseLabelList,
                                     @Param("pg") Page<User> page);
}
